#ifndef _BTREE_H_
#define _BTREE_H_

#include "BTNode.h"
#include "BufferManager.h"

#include <iostream>
using namespace std;

class BTree
{
public:
	BTree(int pSize, BufferManager * manager);
	~BTree();

	bool InsertKey(KEY key);

	KEY PointQuery(KEY querykey);

	KEY RangeQuery(KEY low, KEY high);

public:
	int pageSize;

	BTNode * root;
	BufferManager * bm;

	// statistics 
	int queryTimes;
	int insertTimes;
	int deleteTimes;
};

#endif
